
<template>
  <mu-paper :z-depth="1" class="lan-loadmore-body">
    <mu-appbar color="primary" class="lan-header no-shadow" >
      <mu-button icon slot="left" v-close>
        <i class="iconfont angle-left iconangle-left"></i>
        <span class="lan-header-back">返回</span>
      </mu-button>检查任务内容
      <mu-button icon slot="right" >
        <!-- <mu-icon value="more"></mu-icon> -->
        <!-- <i class="iconfont iconshaixuan4"></i> -->
      </mu-button>
    </mu-appbar>
    <mu-container ref="container" class="lan-loadmore-content no-padding flex_b flex-column">
     <Detaildf :problemId="problemId" style="height:auto;flex:1;width:100%;"></Detaildf>
     <!-- 开始检查 -->
     <div class="lan-block-btn-line lan-dialog-sumit" style="width:100%;" v-if="!lineInfo['checkTime']">
       <mu-button full-width small color="primary" class="lan-block-btn" @click="goCheck()">开始检查</mu-button>
     </div>
    </mu-container>
  </mu-paper>
</template>

<script>
import Detaildf from "../../QualityModule/parameter/task/Detaildf"
export default {
  name: "list",
  components: {
    Detaildf
  },
  data() {
    return {
      problemId:'',
      lineInfo:{},
      userOpen:false,
    };
  },
  async created() {
    // this.getData(this.form);
    // this.projectList = await this.$A.comData("projectList");
    this.lineInfo = JSON.parse(sessionStorage.getItem('checkListDetail') || null)
    if(this.lineInfo){
      this.problemId = this.lineInfo.checkPlanId
    }else{
      this.$router.back()
    }
    
  },
  beforeDestroy(){
    // sessionStorage.removeItem('checkListDetail')
  },
  methods: {


    async getData(params) {

      this.$openLoading();

      let obj = {
        // obj: {
        "orgId":this.$A.GS('orgInfo')['orgId'],
        "type":this.$A.GS('orgInfo')['type'],
        // },
        current: this.pageNo,
        size: this.pageSize
      };
      // if (params) {
      //   Object.assign(obj, params);
      // }
      this.$A.Go('get','/safety/checkProblem/pageList',obj).then(success=>{
          if(success.code == 200){

          }

          this.$closeLoading();
        },
        function(err) {
          console.warn(err);
        }
      );
    },
    goCheck(){
      sessionStorage.setItem('goCheck',JSON.stringify(this.lineInfo))
      this.$router.push('/goCheck')
    },
    goDetail(list) {

      this.$router.push({path:'/accountDetaildf',query:{info:list.problemId}});
    },
  }
};
</script>

<style lang="scss" scoped>
.img-box {
  img {
    width: 80px;
    height: 80px;
    float: left;
    margin: 5px 8px;
  }
}
.lan-form-title {
  line-height: 40px;
}
.opeatLine{
  padding:0.1rem 0.2rem;
  text-align: center;
}
</style>
